package com.powernode.feign;

import com.powernode.domain.Basket;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.ArrayList;
import java.util.List;

@FeignClient(name = "cart-service")
public interface OrderBasketFeign {

    @PostMapping("/p/shopCart/loadBasketById")
    @ApiOperation("根据basketId获取商品")
    List<Basket> loadProdById(@RequestBody List<Long> basketIds);


    @PostMapping("/p/shopCart/removeCartById/{wxUserId}")
    @ApiOperation("删除购物车信息")
    void removeCartById(@RequestBody ArrayList<Long> skuIds, @RequestParam("wxUserId") String wxUserId);
}
